/**
 * Created with IntelliJ IDEA.
 * Description:
 */
public class Demo3 {
    public static void main(String[] args) throws InterruptedException {
        Thread thread =new Thread(()->{
            while (true){
                System.out.println("thread 线程");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        });
        thread.setDaemon(true);
        thread.start();
        Thread.sleep(1000);
    }
}
